﻿using System;
using System.Web.UI;

namespace LKCMS.Web.Admin.Booking
{
    public partial class PEdit : LKCMS.Web.UI.ManagePage
    {
        public int Id;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!int.TryParse(Request.QueryString["id"] as string, out this.Id))
            {
                JscriptMsg(350, 230, "错误提示", "<b>出现错误啦！</b>您要修改的信息不存在或参数不正确。", "back", "Error");
                return;
            }
            if (!Page.IsPostBack)
            {
                chkLoginLevel("lookBooking");
                //绑定类别
                ShowInfo(this.Id);
            }
        }

        //赋值操作
        private void ShowInfo(int _id)
        {
            LKCMS.BLL.Booking bll = new LKCMS.BLL.Booking();
            LKCMS.Model.Booking model = bll.GetModel(_id);

            lbAddTime.Text = model.AddTime.ToString("yyyy-MM-dd");
            lbLineName.Text = model.LineName;
            lbTravelTime.Text = model.TravelTime.ToString("yyyy-MM-dd");
            lbUserCome.Text = model.UserCome;
            lbUserEmail.Text = model.UserEmail;
            lbUserName.Text = model.UserName;
            lbUserTel.Text = model.UserTel;
            lbContent.Text = model.Content;
        }

   

    }
}
